package cmd

import (
	"gallery/crawler/da"
	"strings"

	"github.com/spf13/cobra"
)

// daCmd represents the da command
var daCmd = &cobra.Command{
	Use:   "da [作者名称]",
	Short: "从DA下载图片",
	Long:  `从'DeviantArt'下载指定作者的全部作品`,
	Args:  cobra.ExactArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		da.Start(strings.Trim(args[0], "@~ "))
	},
}

func init() {
	rootCmd.AddCommand(daCmd)
}
